package gui;

import java.awt.Dimension;

import mvc.elicoide.ControllerElicoide2D;
import mvc.elicoide.ControllerElicoide3D;
import mvc.elicoide.ModelElicoide;
import mvc.elicoide.ViewCurveElicoide3D;
import mvc.view.ViewCurve;

import org.geom.curve.helix.Elicoide;
import org.gui.MainWindow;
import org.render.CurveRenderer2D;
import org.render.CurveRenderer3D;

public class ElicoideMainWindow extends MainWindow { private static final long serialVersionUID = 1L;
	
	//---------------------------------------------------------------------- class vars
	
	Dimension viewDimension = new Dimension(250,250);

	//---------------------------------------------------------------------- constructors
	public ElicoideMainWindow(String string) {
		super(string, new ModelElicoide( new Elicoide() ));
		init();
	}
		
	private void init() {
		createView(viewDimension, "piano xy", ViewCurve.class,
				   new CurveRenderer2D(CurveRenderer2D.X),
				   ControllerElicoide2D.class, Elicoide.R);
		
		createView(viewDimension, "piano xz", ViewCurve.class,
				   new CurveRenderer2D(CurveRenderer2D.Y),
				   ControllerElicoide2D.class, Elicoide.K);
		
		createView(viewDimension, "piano zy", ViewCurve.class,
				   new CurveRenderer2D(CurveRenderer2D.Z),
				   ControllerElicoide2D.class, "");
		
		createView(viewDimension, "vista completa", ViewCurveElicoide3D.class,
				   new CurveRenderer3D(curve, viewDimension),
				   ControllerElicoide3D.class, "");
		
		curve.notifyAllViews();		
	}
	
	
	
	
	
}
